<%@ page session="false" contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
	<title>네오아레나 ERP</title>
	<style>
		.navbar-header {
			background-color: #333;
			margin: 0 auto;
			margin-bottom: 10px;
			width: 1280px;
			height: 60px;
			font-size: 14px;
		}
		
		.navbar-brand {
			float: left;
			height: 50px;
			padding: 15px 15px;
			font-size: 18px;
			line-height: 20px;
			color: #cccccc;
			text-decoration: none;
		}
		
		div#contents_div {
			position: relative;
			margin-top: 20px;	
			margin: 0 auto;
			width: 1280px;
			height: 600px;
		}
	
		div#dialog_div {
			position: relative;
			height: 100px;
			border: #a4bed4 1px solid;
			margin: 10px;
		}
	</style>

	<jsp:include page="/WEB-INF/views/common/header2.jsp"/>
	<script type="text/javascript">
		//<![CDATA[
		dhtmlx.image_path = contextPath + "/resources/common/dhtmlx/imgs/";
		
		var mainLayout;
		var leftLayout;
		var rightLayout;
		var mainTabbar;
		var mainTree;
		
		dhtmlxEvent(window, 'load', function() {
			mainLayout = new dhtmlXLayoutObject("contents_div", '2U');
			leftLayout = mainLayout.cells("a");
			rightLayout = mainLayout.cells("b");
			
			leftLayout.setText("메뉴");
			leftLayout.setWidth(200);
			
			mainTree = leftLayout.attachTree();
			mainTree.setIconsPath(contextPath + "/resources/common/dhtmlx/imgs/dhxtree_terrace/", function() {});
			mainTree.loadXML(contextPath + "/resources/xml/tree_menu.xml");
			
			mainTree.setOnClickHandler(treeOnclick);
			
			mainTabbar = rightLayout.attachTabbar();
			mainTabbar.enableTabCloseButton(true);
			
			//mainTabbar.addTab(MENU_ID_DASH_BOARD, menuHashMap[MENU_ID_DASH_BOARD]['text'], null, null, true);
			//mainTabbar.tabs(MENU_ID_DASH_BOARD).attachURL(menuHashMap[MENU_ID_DASH_BOARD]['url']);
		});
		
		function treeOnclick(id) {
			if ( mainTabbar.tabs(id) != null ) {
				mainTabbar.tabs(id).setActive();
			}
			else {
				var menuText = mainTree.getItemText(id);
				var urlData = mainTree.getUserData(id, "url");
				
				if ( urlData != null ) {
					mainTabbar.addTab(id, menuText, null, -1);
					mainTabbar.tabs(id).attachURL(urlData);
					mainTabbar.tabs(id).setActive();
				}
			}
		}
		
		function progressOn() {
			rightLayout.progressOn();
		}
		
		function progressOff() {
			rightLayout.progressOff();
		}		           
		//]]>
	</script>
	<!-- <script type="text/javascript" src= "<c:out value="${pageContext.request.contextPath}"/>/resources/js/main.js"></script>
	 -->
</head>
<body>
	<div class="navbar-header">
		<a class="navbar-brand" href="#">네오아레나 ERP</a>
	</div>
	
	<div id="contents_div"></div>
</body>
</html>